import request from '@/utils/request'

// 查询自定义工艺参数列表
export function listCustomParameter(query) {
  return request({
    url: '/mes/custom/parameter/list',
    method: 'get',
    params: query
  })
}

// 查询自定义工艺参数详细
export function getCustomParameter(id) {
  return request({
    url: '/mes/custom/parameter/' + id,
    method: 'get'
  })
}

export function getCustomParameterByProcessId(id) {
  return request({
    url: '/mes/custom/parameter/processId/' + id,
    method: 'get'
  })
}

export function getDefaultCustomParameter(id) {
  return request({
    url: '/mes/custom/parameter/default/processId/' + id,
    method: 'get'
  })
}

// 新增自定义工艺参数
export function addCustomParameter(data) {
  return request({
    url: '/mes/custom/parameter',
    method: 'post',
    data: data
  })
}

// 修改自定义工艺参数
export function updateCustomParameter(data) {
  return request({
    url: '/mes/custom/parameter',
    method: 'put',
    data: data
  })
}

// 删除自定义工艺参数
export function delCustomParameter(id) {
  return request({
    url: '/mes/custom/parameter/' + id,
    method: 'delete'
  })
}
